<script>
    var a = true;

    var b = new Boolean(true);  // 基本数据类型boolean对应的包装类型Boolean

    console.log(typeof a);
    console.log(typeof b);
    console.log(a === b);


    var c = "abc";
    // c = new String(c);
    console.log(c.toUpperCase());


    var name = 'aaa bbb ccc';
    uw = name.replace(/\b\w+\b/g, function (word) {
        return word.substring(0, 1).toUpperCase() + word.substring(1);
    });

    console.log(uw);

    var url = 'xxxxxx?name=lisi&age=23&gender=male';

    /* {
        name: 'lisi',
        age: 23
    } */

    function parseUrl(url){
        var obj = {};
        // 1. 截取?后面的所有字符串
        // "name=lisi&age=23"
        url = url.substr(url.indexOf("?")+1);
        // 2. 按&进行分割
        // ["name=lisi", "age=23"]
        var arr1 = url.split("&");
        // 3. 再按=分割"name=lisi"
        // ["name", "lisi"]
        for(var i=0; i<arr1.length; i++){
            var arr2 = arr1[i].split("=");
             // 4. 将上面的数组拼成对象
            obj[  arr2[0]  ] = arr2[1];
        }
        return obj;
    }

    console.log(parseUrl(url)); // 
</script>